//SDLFuncsDll.h
//#include "Including.h"


#define SCREEN_WIDTH	800
#define SCREEN_HEIGHT	600
#define SCREEN_BPP		32
#define PI 3.14159

using namespace std;

extern CMD2Model *myModel;
extern CMD2Model *gunModel;

//The protective semaphore
extern SDL_sem *threadLock;

//Variables for Given Texture
extern GLuint texture;
extern GLuint texture1;
extern GLuint texture2;
extern GLuint texture3;
extern GLuint texture4;
extern GLuint texture5;

//Variables for Moving Camera received from UserInput
extern GLfloat s_eye[];
extern GLfloat s_at[];
extern GLfloat s_angle;
extern GLfloat y_angle;
extern float speed;
extern float rad;

//Variable for quit SDL
extern bool quit;

//Surface for OpenGL to be drawn to
//extern SDL_Surface *screen;
//Surface for message
//extern SDL_Surface *message;


namespace SDLFuncs
{
	class MySDLFuncs
	{
	public: 

		// Loads an image from a filename
		static __declspec(dllexport) SDL_Surface* LoadImage(string filename);
		
		// Sets up a texture from a file 
		static __declspec(dllexport) void SetupTexture(string imageName, GLuint &texture);


		// Initialise SDL and OpenGL, Windowing, and Load the Image
		static __declspec(dllexport) bool Init_SDL();
		static __declspec(dllexport) void Init_GL();
		static __declspec(dllexport) bool Init();

		// Clean up RAM
		static __declspec(dllexport) void CleanUp();
		
		// Quit SDL
		static __declspec(dllexport) bool QuitSDL();

		// Drawing Scene
		static __declspec(dllexport) int RenderScene(void *data);

		// Update Scene Elements
		static __declspec(dllexport) int UpdateSceneElements(void *data);

		// Camera Model
		static __declspec(dllexport) int Camera(void *data);

		// User Input
		static __declspec(dllexport) int Input(void *data);

		static __declspec(dllexport) void apply_surface( int x, int y, SDL_Surface* source, SDL_Surface* destination);
		
		
	};
}